home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#39 (Dec 88)
/
Twindow
/
TWindowTester.r
< prev
Wrap
Text File
|
1988-04-29
|
10KB
|
361 lines
/*
* TWindowTester.r
*
* Resources for a simple program to demonstrate usage of tool windows
* by using routines from the TWindow Manager. Tool windows are windows
* that always float on top, typically for palettes and tools.
*
* Written in MPW C 2.0
*
* Thomas Fruin 1988
*
* fruin@hlerul5.BITNET University of Leiden
* thomas@uvabick.UUCP University of Amsterdam
* dibs@well.UUCP
* hol0066.AppleLink
* 2:508/15.FidoNet The Netherlands
*
* TWindowTester is based on MiniEdit - Mini text editor,converted from
* the listing in Macintosh Revealed, vol II. As little as possible was
* modified in the original program, although most of the functionality
* is no longer there.
*/
resource 'MENU' (1) {
1,
textMenuProc,
0x7FFFFFFD,
enabled,
apple,
{ /* array: 2 elements */
/* [1] */
"About TWindowTester ...", noIcon, "", "", plain,
/* [2] */
"-", noIcon, "", "", plain
}
};
resource 'MENU' (2) {
2,
textMenuProc,
0x7FFFFFF3,
enabled,
"File",
{ /* array: 5 elements */
/* [1] */
"New", noIcon, "N", "", plain,
/* [2] */
"New Tool", noIcon, "T", "", plain,
/* [3] */
"Close", noIcon, "W", "", plain,
/* [4] */
"-", noIcon, "", "", plain,
/* [5] */
"Quit", noIcon, "Q", "", plain
}
};
resource 'MENU' (3) {
3,
textMenuProc,
0x7FFFFF80,
enabled,
"Edit",
{ /* array: 7 elements */
/* [1] */
"Undo", noIcon, "Z", "", plain,
/* [2] */
"-", noIcon, "", "", plain,
/* [3] */
"Cut", noIcon, "X", "", plain,
/* [4] */
"Copy", noIcon, "C", "", plain,
/* [5] */
"Paste", noIcon, "V", "", plain,
/* [6] */
"-", noIcon, "", "", plain,
/* [7] */
"Clear", noIcon, "B", "", plain
}
};
resource 'MENU' (4) {
4,
textMenuProc,
allEnabled,
enabled,
"Windows",
{ /* array: 0 elements */
}
};
resource 'MENU' (5) {
5,
textMenuProc,
allEnabled,
enabled,
"Tools",
{ /* array: 0 elements */
}
};
resource 'WIND' (1000) {
{50, 40, 300, 450},
documentProc,
invisible,
goAway,
0x0,
"Document "
};
resource 'WIND' (1001) {
{58, 533, 159, 606},
altDBoxProc,
invisible,
noGoAway,
0x0,
"Tool "
};
resource 'CNTL' (1000) {
{-1, 395, 236, 411},
0,
-1,
0,
0,
scrollBarProc,
0,
"vertical scroll bar"
};
resource 'PICT' (128) {
2616,
{0, 5, 217, 188},
$"1101 A000 82A0 3039 A000 8E01 000A 0000"
$"0000 02D0 0240 9800 1800 0000 0000 8600"
$"C000 0000 0500 8600 BC00 0000 0500 8600"
$"BC00 0106 FC00 0030 EF00 06FC 0000 78EF"
$"0006 FC00 0078 EF00 06FC 0000 32EF 0006"
$"FC00 0007 EF00 06FC 0000 0EEF 0007 FC00"
$"0104 C0F0 000A 0101 80FE 0001 01E0 F000"
$"0A01 03C0 FE00 0101 E0F0 0009 0107 E0FD"
$"0000 C8F0 0009 0107 E0FD 0000 1CF0 0009"
$"0107 E0FD 0000 38F0 0009 0103 C4FD 0000"
$"13F0 000A 0101 8EFD 0001 0780 F100 0A01"
$"001E FD00 0107 80F1 000B 0700 3C00 0060"
$"0003 20F1 000B 0700 38C0 00F0 0000 70F1"
$"000B 0700 11E0 00F0 0000 E8F1 000B 0700"
$"03F0 0060 0000 5CF1 000B 0700 03F0 000F"
$"F000 38F1 000B 0700 03F0 003F FC00 13F1"
$"000C 0800 01E0 00FF FF00 0780 F200 0C08"
$"0000 C301 FFFF 8007 80F2 000B 0700 0007"
$"83FF FFC0 03F1 000A 0600 000F C7FF FFE0"
$"F000 0A06 0000 0FCF FFFF F0F0 000A 0600"
$"000F CFFE FFF0 F000 0A06 0000 079F FE7F"
$"F8F0 000A 0600 0003 1FFE 3FF8 F000 09FE"
$"0003 3FFE 1FFC F000 09FE 0003 3FFE 3FFC"
$"F000 09FE 0003 3FFC 7FFC F000 09FE 0003"
$"3FFC 7BFC F000 09FE 0003 3FF8 F9FC F000"
$"09FE 0003 3FF8 F8FC F000 09FE 0003 3FF9"
$"E3FC F000 09FE 0003 3FF1 0FFC F000 09FE"
$"0003 3FF0 7FFC F000 0AFE 0004 3FE1 FFFC"
$"C0F1 000A FE00 041F F7FF F9E0 F100 0AFE"
$"0004 1FFF FFF9 E0F1 000A FE00 040F FFFF"
$"F0C8 F100 0AFE 0004 0FFF FFF0 1CF1 000A"
$"FE00 0407 FFFF E038 F100 0AFE 0004 03FF"
$"FFC0 13F1 000B FE00 0501 FFFF 8007 80F2"
$"000A FD00 04FF FF00 0780 F200 09FD 0003"
$"3FFC 0003 F100 07FD 0001 0FF0 EF00 02E9"
$"0009 FB00 0330 000F F0F3 0009 FB00 0378"
$"003F FCF3 0009 FB00 03F0 00FF FFF3 000B"
$"FC00 0501 E201 FFFF 80F4 000B FC00 0501"
$"C703 FFFF C0F4 000A FB00 048F 07FF FFE0"
$"F400 0AFB 0004 1E0F FFFF F0F4 000A FB00"
$"043C 0FFF FFF0 F400 0AFB 0004 181F FFFF"
$"F8F4 0009 FA00 031F FFFF F8F4 0009 FA00"
$"033F FFEF FCF4 0009 FA00 033F FF87 FCF4"
$"0009 FA00 033F FC0F FCF4 000B FC00 0530"
$"003F F08F FCF4 000B FC00 0578 003E 038F"
$"FCF4 000B FC00 0578 003F 391F FCF4 000B"
$"FC00 0532 003F BC1F FCF4 000B FC00 0507"
$"003F FE1F FCF4 000B FC00 050E 003F FF3F"
$"FCF4 000B FC00 0504 C03F FE3F FCF4 000C"
$"FC00 0601 E01F F83F F8C0 F500 0CFC 0006"
$"01E0 1FFC 7FF9 E0F5 000B FB00 05D8 0FFE"
$"7FF1 E0F5 000B FB00 053C 0FFF 7FF0 C8F5"
$"000B FB00 053C 07FF FFE0 1CF5 000B FB00"
$"051B 03FF FFC0 3AF5 000B FB00 0507 81FF"
$"FF80 17F5 000B FB00 0507 80FF FF00 0EF5"
$"000C FB00 0603 603F FC00 04C0 F600 0BFA"
$"0005 F00F F000 01E0 F600 0BFA 0000 F0FE"
$"0001 01E0 F600 0CFA 0006 6C00 0020 00CF"
$"F0F7 000C FA00 061E 0000 7000 3FFC F700"
$"0CFA 0006 1E00 00F0 00FF FFF7 000D FA00"
$"070C 8001 E001 FFFF 80F8 000D FA00 0701"
$"C001 C603 FFFF C0F8 000D FA00 0703 8000"
$"8F07 FFFF E0F8 000D FA00 0701 0000 1F8F"
$"FDFF F0F8 000A F700 041F 8FFC FFF0 F800"
$"0AF7 0004 1F9F F87F F8F8 000A F700 040F"
$"1FF0 7FF8 F800 0DF7 0007 063F E4FF FC00"
$"0030 FB00 0CF6 0006 3FC8 FFFC 0000 78FB"
$"000C F600 063F 99FF FC00 0078 FB00 0CF6"
$"0006 3F39 FBFC 0000 32FB 000C F600 063C"
$"71F1 FC00 0007 FB00 0CF6 0006 3E73 C0FC"
$"0000 0EFB 000D F600 073F 7330 FC00 0004"
$"C0FC 000D F600 073F F0E3 FC00 0001 E0FC"
$"000D F600 073F E3C7 FC00 0001 E0FC 000F"
$"F800 0530 003F EF8F FCFE 0000 C8FC 000F"
$"F800 0578 001F FF1F F8FE 0000 1CFC 000F"
$"F800 0978 001F F83F F840 0000 38FC 000F"
$"F800 0932 000F FC7F F0E0 0000 13FC 0010"
$"F800 0A07 000F FE7F F1D0 0000 0780 FD00"
$"10F8 000A 0E00 07FF 7FE0 B800 0007 80FD"
$"0010 F800 0A04 C003 FFFF C074 0000 0360"
$"FD00 10F8 0006 01E0 01FF FF80 2EFE 0000"
$"F0FD 0010 F800 0601 E000 FFFF 001C FE00"
$"00F0 FD00 0FF7 0009 D800 3FFC 0009 8000"
$"006C FD00 0FF7 0009 3C00 0FF0 0003 C000"
$"001E FD00 0EF7 0000 3CFD 0004 03C0 0000"
$"1EFD 0010 F700 0A19 0000 0180 0180 0000"
$"0D80 FE00 10F7 000A 0380 0003 C000 1FE0"
$"0003 C0FE 0010 F700 0A07 4000 07E0 007F"
$"F800 03C0 FE00 10F7 000A 02E0 0007 E001"
$"FFFE 0001 80FE 000D F700 0701 C000 07E0"
$"03FF FFFB 000D F600 0798 0003 C407 FFFF"
$"80FC 000F F600 093C 0001 8E0F FFFF C000"
$"01FE 0010 F600 0A3C 0000 1E1F FFFF E000"
$"0380 FF00 10F6 000A 1900 003C 1FFF FFE0"
$"0006 C0FF 0010 F600 0A03 8000 383F FFFF"
$"F000 0C60 FF00 10F6 000A 0700 0010 3FFE"
$"FFF0 0018 30FF 0010 F600 0002 FE00 067F"
$"FE7F F800 3018 FF00 0CF2 0006 7FFC 3FF8"
$"0060 0CFF 000C F200 067F F81F F800 C006"
$"FF00 0CF2 0006 7FF0 6FF8 00C0 03FF 000C"
$"F200 087F E0EF F800 E001 8000 0CF2 0008"
$"7FC1 E7F8 00B0 00C0 000C F200 087F 81C7"
$"F800 9800 6000 0CF2 0008 7E04 07F8 018C"
$"0030 000C F200 087F 0E0F F803 C600 1800"
$"0CF2 0008 7F9F 9FF8 0663 000C 000C F200"
$"083F DFFF F0CC 3180 0600 9800 1800 8600"
$"0000 D900 C000 8600 0500 D900 BC00 8600"
$"0500 D900 BC00 010C F200 083F FFFF F1F8"
$"1980 0300 0CF2 0008 1FFF FFE3 300F 0001"
$"800C F200 081F FFFF E618 0600 00C0 0CF2"
$"0008 0FFF FFCC 0C0C 0000 600C F200 0807"
$"FFFF 9806 1800 0030 0CF2 0008 03FF FF30"
$"0330 0000 700C F200 0801 FFFE 7001 E000"
$"00D0 0BF1 0007 7FF8 5800 C000 0190 0BF1"
$"0002 1FE0 4CFE 0001 0330 09EF 0000 66FE"
$"0001 0660 0AF0 0001 01B3 FE00 010C C00A"
$"F000 0603 D980 0000 1980 0AF0 0006 07EC"
$"C000 0033 000A F000 0607 E660 0000 6600"
$"0AF0 0006 07E3 3000 00CC 000A F000 0603"
$"C598 0001 9800 0AF0 0006 018E CC00 0330"
$"0009 EF00 051E E600 0670 0009 EF00 053D"
$"B300 0CD8 0009 EF00 053B F980 19CC 0009"
$"EF00 0517 FCC0 33E6 0009 EF00 050F FE60"
$"67F3 0009 EF00 051B F330 CFF9 8009 EF00"
$"0533 F199 9FFC C009 EF00 0567 E0CF 3FFE"
$"6009 EF00 05CC C7E6 7FFF 300A F000 0601"
$"980F F0FF FF30 0AF0 0006 03CC 0FF9 FFFE"
$"700A F000 0606 660F FFFF FCD0 0AF0 0006"
$"0433 0FFF FFF9 900A F000 0604 1987 FFFF"
$"F310 0AF0 0006 040C C3FF FFE6 100A F000"
$"0604 0663 FFFF CCD0 0AF0 0006 0403 37FF"
$"FF99 D00A F000 0604 019F FFFF 33D0 0AF0"
$"0006 0400 CFFF FE67 D00A F000 0604 0067"
$"FFFC CF50 0AF0 0006 0400 33FF F99A 500A"
$"F000 0604 0019 FFF3 3250 0AF0 0006 0400"
$"0CFF E662 500A F000 0604 0006 7FCC C250"
$"0AF0 0006 0400 033F 9982 500A F000 0604"
$"0001 9F33 0250 0AF0 0006 0400 00CE 6602"
$"500A F000 0604 0000 64CC 0250 0AF0 0006"
$"0400 0031 9806 500A F000 0604 0000 1B30"
$"0CD0 0AF0 0006 0400 000E 6019 900A F000"
$"0604 0000 04C0 3310 0AF0 0000 04FE 0002"
$"8066 500A F000 0004 FE00 0280 CCD0 0AF0"
$"0000 04FE 0002 8199 900A F000 0004 FE00"
$"0283 3330 0AF0 0000 04FE 0002 8666 600A"
$"F000 0004 FE00 028C CCC0 0AF0 0000 04FE"
$"0002 9999 C00A F000 0004 FE00 02B3 3340"
$"0AF0 0000 04FE 0002 E626 400A F000 0004"
$"FE00 02CC 0C40 0AF0 0000 04FE 0002 9818"
$"C00A F000 0004 FE00 02B0 3180 0AF0 0000"
$"06FE 0002 E063 000A F000 0003 FE00 02C0"
$"C600 0AF0 0006 0180 0000 818C 0009 EF00"
$"05C0 0000 0318 0009 EF00 0560 0000 0630"
$"0009 EF00 0530 0000 0C60 0009 EF00 0518"
$"0000 18C0 0009 EF00 050C 0000 3180 0009"
$"EF00 0306 0000 63FF 0009 EF00 0303 0020"
$"C6FF 0009 EF00 0301 8031 8CFF 0008 EE00"
$"02C0 1B18 FF00 08EE 0002 600E 30FF 0008"
$"EE00 0230 0460 FF00 08EE 0002 1800 C0FF"
$"0008 EE00 020C 0180 FF00 07EE 0001 0603"
$"FE00 07EE 0001 0306 FE00 07EE 0001 018C"
$"FE00 06ED 0000 D8FE 0006 ED00 0070 FE00"
$"06ED 0000 20FE 00A0 008F A000 83FF"
};
resource 'DLOG' (128) {
{62, 77, 312, 437},
dBoxProc,
invisible,
noGoAway,
0x0,
128,
"About"
};
resource 'DITL' (128) {
{ /* array DITLarray: 7 elements */
/* [1] */
{27, 270, 48, 341},
Button {
enabled,
"OK"
},
/* [2] */
{56, 66, 73, 174},
StaticText {
disabled,
"TWindowTester"
},
/* [3] */
{189, 19, 226, 266},
StaticText {
disabled,
"Originally written for VAMP, "
"the Dutch Mac programmers group."
},
/* [4] */
{99, 60, 116, 172},
StaticText {
disabled,
"by Thomas Fruin"
},
/* [5] */
{117, 34, 135, 196},
StaticText {
disabled,
"Leiden, The Netherlands"
},
/* [6] */
{148, 68, 164, 169},
StaticText {
disabled,
"20 April 1988"
},
/* [7] */
{9, 158, 226, 341},
Picture {
disabled,
128
},
/* [8] */
{27, 270, 48, 341},
UserItem {
disabled
}
}
};